// 音乐API路由

const express = require('express');
const router = express.Router();
const MusicController = require('../controllers/MusicController');

// 定义音乐相关的API路由
router.get('/', MusicController.getAllMusic);             // 获取所有音乐列表
router.get('/search', MusicController.searchMusic);        // 搜索音乐
router.get('/:id', MusicController.getMusicById);          // 获取单个音乐详情
router.post('/upload', MusicController.uploadMusic);       // 上传音乐文件

module.exports = router;